package com.zhuss.controller.product;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.zhuss.bean.bo.product.train.CreateLineStrategyBo;
import com.zhuss.bean.bo.product.train.DeleteLineStrategyBo;
import com.zhuss.bean.bo.product.train.UpdateLineStrategyBo;
import com.zhuss.common.BaseController;
import com.zhuss.common.OperateService;
import com.zhuss.product.train.LineStrategyOperateServiceExt;
import com.zhuss.exception.DzcxException;


/**
 * @description: 线路策略操作的Controller
 * @author: zhushanshuo
 * @create: Mon Jan 04 09:51:07 CST 2021
 **/
@RestController
@RequestMapping("/lineStrategy")
public class LineStrategyOperateController extends BaseController {
	
	@Autowired
	@Qualifier("lineStrategyOperateService")
	private OperateService<Void, Object> lineStrategyOperateService;
	
	@Autowired
	@Qualifier("lineStrategyOperateServiceExt")
	private LineStrategyOperateServiceExt lineStrategyOperateServiceExt;
	
	/**
	 * 创建
	 * @param bo
	 * @throws DzcxException
	 */
	@ResponseBody
    @PostMapping("/create")
    public void create(@RequestBody CreateLineStrategyBo bo) throws DzcxException {
		
		lineStrategyOperateService.create(bo);
    }
	
	
	/**
	 * 修改
	 * @param bo
	 * @throws DzcxException
	 */
	@ResponseBody
    @PostMapping("/update")
    public void update(@RequestBody UpdateLineStrategyBo bo) throws DzcxException {
		
		lineStrategyOperateService.update(bo);
    }
	
	/**
	 * 删除
	 * @param bo
	 * @throws DzcxException
	 */
	@ResponseBody
    @PostMapping("/delete")
    public void delete(@RequestBody DeleteLineStrategyBo bo) throws DzcxException {
		
		lineStrategyOperateService.delete(bo);
    }
	
}
